﻿using System;
using System.Collections.Generic;
using System.Windows.Forms;
using System.Data.Entity;
using CharitiesLib;
using System.Linq;
using System.IO;


namespace Charities
{
    static class Program
    {
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        [STAThread]
        static void Main()
        {
            try
            {
             //   Database.SetInitializer(new MyInitilayzer());
               // ModelContainer db = new ModelContainer();
             //   db.Database.Initialize(true);
                Application.EnableVisualStyles();
                Application.SetCompatibleTextRenderingDefault(false);
                if (!File.Exists("ConStr.esd") || new FileInfo("ConStr.esd").Length == 0)
                {
                    Application.Run(new Forms.ConnetionBuilder());
                }
                else
                {
                    Application.Run(new Login());
                }
            }
            catch (Exception ex)
            {

                MessageBox.Show(ex.Message);
            }
        }
    }
}
